package com.venus.model;

import java.util.Date;

import com.venus.common.utils.MathUtil;



/**
 * Account entity. @author MyEclipse Persistence Tools
 */

public class AccountVO  implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer accountId;
    private String accountName;
    private Float amount;
    private String note;
    private PubUserVO pubUser;
    private Integer sort;
    private Date createDate;
    private String area;
    // Constructors

    /** default constructor */
    public AccountVO() {
    }
    
    /** full constructor */
    public AccountVO(String accountName, Float amount) {
        this.accountName = accountName;
        this.amount = amount;
    }
   
    // Property accessors

    public Integer getAccountId() {
        return this.accountId;
    }
    
    public void setAccountId(Integer accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return this.accountName;
    }
    
    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public Float getAmount() {
        return this.amount;
    }
    
    public void setAmount(Float amount) {
        this.amount = amount;
    }

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public PubUserVO getPubUser() {
		return pubUser;
	}
	
	public void setPubUser(PubUserVO pubUser) {
		this.pubUser = pubUser;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}
	
	// 加余额
	public void addAmount(Float fAmount){
		this.amount = MathUtil.round(this.amount+fAmount, 2).floatValue();
	}
	// 减余额
	public void subAmount(Float fAmount){
		this.amount = MathUtil.round(this.amount-fAmount, 2).floatValue();
	}





}